using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace com.yoozoo.gta.Art.City2D
{
    //摩天轮系统
    public class FerrisWheelSystem : MonoBehaviour
    {
        public float rotateSpeed = 1.0f;
        public GameObject ferrisWheelObj;
        public GameObject[] ferrisWheelbox;
        void Start()
        {
            
        }
        
        void Update()
        {
            if (ferrisWheelObj == null || ferrisWheelbox == null)
            {
                return;
            }
            ferrisWheelObj.transform.Rotate(Vector3.forward * Time.deltaTime * rotateSpeed);
            for (int i = 0; i < ferrisWheelbox.Length; i++)
            {
                ferrisWheelbox[i].transform.Rotate(Vector3.forward * Time.deltaTime * (-rotateSpeed));
            }
        }
    }
}
